package com.testmanager.testmananger.quantitative.service;

import com.testmanager.testmananger.quantitative.domain.ProjectInfoEntity;
import com.testmanager.testmananger.quantitative.repository.ProjectInfoRepository;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.sql.Savepoint;
import java.util.List;

@Service
@Slf4j
public class ProjectInfoService {
    @Autowired
    ProjectInfoRepository projectInfoRepository;


    public List<ProjectInfoEntity> getAllProjectInfo(){
        return projectInfoRepository.findAll();
    }

    public  List<ProjectInfoEntity> saveProjectInfo(ProjectInfoEntity projectInfoEntity){
        projectInfoRepository.save(projectInfoEntity);
        return getAllProjectInfo();
    }
}
